home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / src / rect.s < prev    next >
Text File  |  1999-02-04  |  2KB  |  87 lines

  1.  
  2. ; Storm C Compiler
  3. ; Work2:Mesa3/Mesa-3.0/src/rect.c
  4.     mc68030
  5.     mc68881
  6.     XREF    _gl_End
  7.     XREF    _gl_Begin
  8.     XREF    _gl_error
  9.     XREF    _CC
  10.  
  11.     SECTION "_gl_Rectf:0",CODE
  12.  
  13.  
  14. ;void gl_Rectf( GLcontext *ctx, GLfloat x1, GLfloat y1, GLfloat x2, G
  15.     XDEF    _gl_Rectf
  16. _gl_Rectf
  17.     move.l    a2,-(a7)
  18.     fmovem.x fp2/fp3/fp4/fp5,-(a7)
  19.     move.l    $38(a7),a2
  20.     fmove.s    $48(a7),fp2
  21.     fmove.s    $44(a7),fp3
  22.     fmove.s    $3C(a7),fp4
  23.     fmove.s    $40(a7),fp5
  24. L3
  25. ;   if (INSIDE_BEGIN_END(ctx)) 
  26.     move.l    a2,a0
  27.     add.l    #$E968,a0
  28.     move.l    (a0),d0
  29.     cmp.l    #$1A00,d0
  30.     beq.b    L5
  31. L4
  32. ;      gl_error( ctx, GL_INVALID_OPERATION, "glRect" );
  33.     move.l    #L2,-(a7)
  34.     pea    $502.w
  35.     move.l    a2,-(a7)
  36.     jsr    _gl_error
  37.     add.w    #$C,a7
  38.     fmovem.x (a7)+,fp2/fp3/fp4/fp5
  39.     move.l    (a7)+,a2
  40.     rts
  41. L5
  42. ;   gl_Begin( ctx, GL_QUADS );
  43.     pea    7.w
  44.     move.l    a2,-(a7)
  45.     jsr    _gl_Begin
  46.     addq.w    #$8,a7
  47. ;   (*ctx->Exec.Vertex2f)( ctx, x1, y1 );
  48.     fmove.s    fp5,-(a7)
  49.     fmove.s    fp4,-(a7)
  50.     move.l    a2,-(a7)
  51.     move.l    $8BC(a2),a0
  52.     jsr    (a0)
  53.     add.w    #$C,a7
  54. ;   (*ctx->Exec.Vertex2f)( ctx, x2, y1 );
  55.     fmove.s    fp5,-(a7)
  56.     fmove.s    fp3,-(a7)
  57.     move.l    a2,-(a7)
  58.     move.l    $8BC(a2),a0
  59.     jsr    (a0)
  60.     add.w    #$C,a7
  61. ;   (*ctx->Exec.Vertex2f)( ctx, x2, y2 );
  62.     fmove.s    fp2,-(a7)
  63.     fmove.s    fp3,-(a7)
  64.     move.l    a2,-(a7)
  65.     move.l    $8BC(a2),a0
  66.     jsr    (a0)
  67.     add.w    #$C,a7
  68. ;   (*ctx->Exec.Vertex2f)( ctx, x1, y2 );
  69.     fmove.s    fp2,-(a7)
  70.     fmove.s    fp4,-(a7)
  71.     move.l    a2,-(a7)
  72.     move.l    $8BC(a2),a0
  73.     jsr    (a0)
  74.     add.w    #$C,a7
  75. ;   gl_End( ctx );
  76.     move.l    a2,-(a7)
  77.     jsr    _gl_End
  78.     addq.w    #4,a7
  79.     fmovem.x (a7)+,fp2/fp3/fp4/fp5
  80.     move.l    (a7)+,a2
  81.     rts
  82.  
  83. L2
  84.     dc.b    'glRect',0
  85.  
  86.     END
  87.